package com.k2data.k2app.rest;

import com.k2data.k2app.domain.deviceRest.Event;
import com.k2data.k2app.rest.domain.RectList;
import com.k2data.k2app.rest.domain.RectObject;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by clb on 17-6-15.
 */
@Component
public class DeviceClientFallback implements DeviceClient {


	@Override
	public RectList getAllDevices (@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize,@RequestParam("deviceNo") String deviceNo) {
		RectList rectList = new RectList();
		return rectList.initDeviceRectList();
	}

	@Override
	public RectObject getDeviceById (@PathVariable("id") Long id) {
		RectObject rectObject = new RectObject();
		return rectObject.initDeviceRectMap();
	}

	@Override
	public RectObject updateDevice (@PathVariable("id") Long id, Object device) {
		RectObject rectObject = new RectObject();
		return rectObject.initDeviceRectMap();
	}

	@Override
	public RectList getTemplateDeviceById (@RequestParam("id") Long id) {
		RectList rectObject = new RectList();
		return rectObject.initDeviceRectList();
	}

	@Override
	public RectList getTemplatePointById (@PathVariable("id") Long id) {
		RectList rectObject = new RectList();
		return rectObject.initDeviceRectList();
	}

	@Override
	public RectObject getDevicePointById(@PathVariable("id") Long id) {
		RectObject rectObject = new RectObject();
		return rectObject.initDeviceRectMap();
	}

	@Override
	public RectList getDevicePoint(@RequestParam("root_id") Long root_id, @RequestParam("monitorPointId") Long monitorPointId,
								   @RequestParam("channelId") Integer channelId,
								   @RequestParam("isGroup") boolean isGroup) {
		RectList rectObject = new RectList();
		return rectObject.initDeviceRectList();
	}

	@Override
	public RectObject getDevicePointGroup(@RequestParam("root_id") Long root_id, @RequestParam("monitorPointId") Long monitorPointId, @RequestParam("channelId") Integer channelId, @RequestParam("isGroup") boolean isGroup) {
		RectObject rectObject = new RectObject();
		return rectObject.initDeviceRectMap();
	}

	@Override
	public RectList getTemplateVariablesById (@PathVariable("id") Long id) {
		RectList rectObject = new RectList();
		return rectObject.initDeviceRectList();
	}

	@Override
	public RectList getDeviceVariablesById(@PathVariable("id") Long id) {
		RectList rectObject = new RectList();
		return rectObject.initDeviceRectList();
	}

	@Override
	public RectObject getCustomerById (@RequestParam(value = "id") Long id) {
		RectObject rectObject = new RectObject();
		return rectObject.initDeviceRectMap();
	}

	@Override
	public RectObject addEvent (@RequestBody Event event) {
		RectObject rectObject = new RectObject();
		return rectObject.initDeviceRectMap();
	}

	@Override
	public void changeStatus(String deviceNo, String status) {

	}


}
